<template>
    <div>
        <el-icon @click="ck">
        <caret-left v-if="$store.state.homeview.navBool"/>
        <caret-right v-else/>
    </el-icon>
    </div>
</template>

<script setup lang="ts">
import { CaretRight,CaretLeft } from "@element-plus/icons-vue";
import {useStore} from 'vuex'

const store = useStore()

let ck = () => {
    console.log('点击了头部导航');
    store.commit("SET_NAVBOOL")
    
}
</script>

<style scoped lang="scss">
.el-header {
    line-height: 70px; //设置图标垂直居中

    .el-icon {
        font-size: 20px; //设置图标大小
    }
}
</style>